home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / comm / www / WWWworkbenchIB.lha / WWWworkbench / W4copytoother.ibrx < prev    next >
Encoding:
Text File  |  1998-09-10  |  1.6 KB  |  56 lines

  1. /* $VER: W4CopytoOther.ibrx  1.0
  2. *Made by Andres Pääbo (c)1998 : paabo@bancom.net
  3. */
  4. OPTIONS RESULTS
  5.  
  6. screen=getclip('screen')
  7. call open('window', 'con:0/0/10/10/neededforoperation/close/screen 'screen)
  8. ADDRESS 'IBROWSE'
  9. 'QUERY TITLE' 
  10. currdir=result
  11.  
  12. ADDRESS COMMAND 'REQUESTFILE > "RAM:W4/resultstring"   TITLE "Select files to COPY To OTHER " MULTISELECT NOICONS   DRAWER "'currdir'" FILE  "" PUBSCREEN "'screen'"'
  13. IF rc=5 then  DO; call close('window');EXIT;END
  14. call open('resultstring','Ram:W4/resultstring',R)
  15. resultstring=readln('resultstring')
  16. resultstring=TRANSLATE(resultstring, ' ','"')
  17. resultstring=STRIP(resultstring)
  18. close('resultstring')
  19.  
  20. ADDRESS COMMAND 'C:REQUESTCHOICE >RAM:W4/resultstring 
  21. "COPY FILES"  "Where to?Activate the Destination Window" "DONE|ABORT" PUBSCREEN "'screen'"'
  22. call open('resultstring','Ram:W4/resultstring',R)
  23. response=readln('resultstring')
  24. close('resultstring')
  25. if response=0 then DO; call close('window');EXIT;END
  26.  
  27.  
  28. 'QUERY ACTIVEWINDOWNR'
  29. otherframe=result
  30. if otherframe = '' then EXIT  
  31. 'QUERY TITLE WINDOWNR 'otherframe
  32. othercurrdir=result
  33.  
  34. i=0
  35. DO FOREVER
  36. i=i+1
  37. parse var resultstring filename.i filesrest
  38. if filename.i='' then BREAK
  39. resultstring=filesrest
  40. len=LENGTH(filename.i)
  41. slashpos=LASTPOS('/',filename.i)
  42.     if slashpos=0 then slashpos=LASTPOS(':',filename.i)
  43. dnlfile.i=SUBSTR(filename.i,slashpos+1)
  44. ADDRESS COMMAND 'COPY FROM "'filename.i'" TO  "'othercurrdir||dnlfile.i'"'
  45. END
  46.  
  47. call setclip('refresh',  1)  /*any nonzero number suppresses requester*/
  48.  
  49.  
  50. ADDRESS COMMAND  'Sys:RexxC/RX  WWWworkbench/WWWworkbench.ibrx'
  51.  
  52. call close('window')
  53.  
  54.  
  55. EXIT 0
  56.